import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';

// pages
import { NoFundPageComponent } from '../pages/no-fund-page/no-fund-page.component';

const routerConfig: Routes = [
  {
    path: '',
    redirectTo: 'home',
    pathMatch: 'full',
  },
  {
    path: 'home',
    loadChildren: '../pages/home/home.module#HomeModule'
  },
  {
    path: 'coffees',
    loadChildren: '../pages/coffees/coffees.module#CoffeesModule'
  },
  {
   path: 'menu',
   loadChildren: '../pages/menu/menu.module#MenuModule'
  },
  {
   path: '**',
   component: NoFundPageComponent
  }

];

@NgModule({
  imports: [
    CommonModule,
    RouterModule.forRoot(routerConfig)
  ],
  exports: [
    RouterModule
  ]
})
export class AppRoutingModule { }
